home *** CD-ROM | disk | FTP | other *** search
- Path: howland.reston.ans.net!torn!nott!cunews!wabakimi!abelo
- From: abelo@chat.carleton.ca (Andrew Belo)
- Newsgroups: comp.lang.c
- Subject: floats in borland C++ 4.5
- Date: 16 Mar 1996 18:48:44 GMT
- Organization: Carleton University, Ottawa, Canada
- Message-ID: <4if2ec$scg@bertrand.ccs.carleton.ca>
- NNTP-Posting-Host: wabakimi.carleton.ca
- X-Newsreader: TIN [version 1.2 PL2]
-
-
- When ever I write a program that uses float or doubles I get errors such
- as floating point library not linked or stack fault. These errors do not
- happen when I am compiling my files the happen when I am actualy running
- the program! I will post some code to give you an example. WHen running
- this code it gives the following message
- Floating point error: Stack
- fault. Abnormal termination.
-
- when this function is called:
-
- void bubblesort( double *dblarray, int numberOfElements)
-
- {
- int top, search, temp;
-
- for( top = 0; top < numberOfElements -1; top++)
- for(search = top +1; search < numberOfElements; search++)
- if(dblarray[search] > dblarray[top])
- {
- temp = dblarray[search];
- dblarray[search] = dblarray[top];
- dblarray[top] = temp;
- }
-
- }
-
- Thanx for any help that can be given!
-
-